home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
abcslots
/
slots.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
7KB
|
287 lines
VERSION 2.00
Begin Form Main
BackColor = &H00FFFF00&
BorderStyle = 3 'Fixed Double
Caption = "ABC Slots"
ClientHeight = 3480
ClientLeft = 1095
ClientTop = 1770
ClientWidth = 6840
ControlBox = 0 'False
ForeColor = &H000000FF&
Height = 4170
Icon = SLOTS.FRX:0000
Left = 1035
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 3480
ScaleWidth = 6840
Top = 1140
Width = 6960
Begin Timer Timer3
Interval = 40
Left = 1440
Top = 3480
End
Begin Timer Timer2
Interval = 40
Left = 840
Top = 3480
End
Begin Timer Timer1
Interval = 40
Left = 240
Top = 3480
End
Begin PictureBox Picture8
Height = 855
Left = 4200
ScaleHeight = 825
ScaleWidth = 585
TabIndex = 9
Top = 3240
Visible = 0 'False
Width = 615
End
Begin PictureBox Picture7
Height = 855
Left = 5760
ScaleHeight = 825
ScaleWidth = 585
TabIndex = 8
Top = 2280
Visible = 0 'False
Width = 615
End
Begin PictureBox Picture6
Height = 855
Left = 4920
ScaleHeight = 825
ScaleWidth = 705
TabIndex = 7
Top = 2280
Visible = 0 'False
Width = 735
End
Begin PictureBox Picture5
Height = 855
Left = 4200
ScaleHeight = 825
ScaleWidth = 585
TabIndex = 6
Top = 2280
Visible = 0 'False
Width = 615
End
Begin CommandButton Command2
Caption = "Stop"
Height = 495
Left = 4560
TabIndex = 2
Top = 1440
Width = 1815
End
Begin CommandButton Command1
Caption = "Spin"
Height = 615
Left = 4560
TabIndex = 1
Top = 360
Width = 1815
End
Begin PictureBox Picture1
AutoSize = -1 'True
BackColor = &H00FFFF80&
BorderStyle = 0 'None
ForeColor = &H0080FF80&
Height = 3255
Left = 120
Picture = SLOTS.FRX:0302
ScaleHeight = 3255
ScaleWidth = 3795
TabIndex = 0
Top = 120
Width = 3795
Begin PictureBox Picture4
Height = 960
Left = 2415
ScaleHeight = 930
ScaleWidth = 840
TabIndex = 5
Top = 705
Width = 870
End
Begin PictureBox Picture3
Height = 960
Left = 1440
ScaleHeight = 930
ScaleWidth = 840
TabIndex = 4
Top = 705
Width = 870
End
Begin PictureBox Picture2
Height = 975
Left = 465
ScaleHeight = 945
ScaleWidth = 825
TabIndex = 3
Top = 690
Width = 855
End
End
Begin Menu Slots
Caption = "ABC &Slots!"
Begin Menu About
Caption = "&About!"
End
Begin Menu Outa
Caption = "&Exit"
End
End
End
Sub About_Click ()
About1$ = "You have won" + Str$(TotalWins) + " time(s). " + "You have lost" + Str$(TotalLoses) + " time(s)."
About2$ = About1$ + Chr$(13) + Chr$(13)
About1$ = "ABC Slots" + Chr$(13) + "A BMB Production!" + Chr$(13) + "Version 1.00B" + Chr$(13) + "12/21/91"
About2$ = About2$ + About1$
MsgBox About2$, 0, "ABC Slots"
End Sub
Sub Command1_Click ()
Timer1.Enabled = True
End Sub
Sub Command2_Click ()
If Count = 1 Then
Timer1.Enabled = False
Timer2.Enabled = True
End If
If Count = 2 Then
Timer2.Enabled = False
Timer3.Enabled = True
End If
If Count = 3 Then
Timer3.Enabled = False
If Win1 = 1 And Win2 = 1 And Win3 = 1 Then UserWin = True
If Win1 = 2 And Win2 = 2 And Win3 = 2 Then UserWin = True
If Win1 = 3 And Win2 = 3 And Win3 = 3 Then UserWin = True
If UserWin = True Then
MsgBox "You have won!", 64, "ABC Slots"
Picture2.Picture = Picture8.Picture
Picture3.Picture = Picture8.Picture
Picture4.Picture = Picture8.Picture
TotalWins = TotalWins + 1
End If
If UserWin = False Then
MsgBox "You lose!", 64, "ABC Slots"
Picture2.Picture = Picture8.Picture
Picture3.Picture = Picture8.Picture
Picture4.Picture = Picture8.Picture
TotalLoses = TotalLoses + 1
End If
UserWin = False
End If
End Sub
Sub Form_Load ()
Count = 0
TotalWins = 0
TotalLoses = 0
UserWin = False
Win1 = 0
Win2 = 0
Win3 = 0
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Randomize Timer
Picture5.Picture = LoadPicture("Pic-A.BMP")
Picture6.Picture = LoadPicture("Pic-B.BMP")
Picture7.Picture = LoadPicture("Pic-C.BMP")
End Sub
Sub Options_Click ()
End Sub
Sub Outa_Click ()
Bye$ = "You have won" + Str$(TotalWins) + " time(s). " + "You have lost" + Str$(TotalLoses) + " time(s)."
MsgBox Bye$, 0, "ABC SlotS"
End
End Sub
Sub Timer1_Timer ()
Choose = Int(Rnd * 3)
If Choose = 0 Then
Picture2.Picture = Picture5.Picture
Win1 = 1
End If
If Choose = 1 Then
Picture2.Picture = Picture6.Picture
Win1 = 2
End If
If Choose = 2 Then
Picture2.Picture = Picture7.Picture
Win1 = 3
End If
Count = 1
End Sub
Sub Timer2_Timer ()
Choose = Int(Rnd * 3)
If Choose = 0 Then
Picture3.Picture = Picture5.Picture
Win2 = 1
End If
If Choose = 1 Then
Picture3.Picture = Picture6.Picture
Win2 = 2
End If
If Choose = 2 Then
Picture3.Picture = Picture7.Picture
Win2 = 3
End If
Count = 2
End Sub
Sub Timer3_Timer ()
Choose = Int(Rnd * 3)
If Choose = 0 Then
Picture4.Picture = Picture5.Picture
Win3 = 1
End If
If Choose = 1 Then
Picture4.Picture = Picture6.Picture
Win3 = 2
End If
If Choose = 2 Then
Picture4.Picture = Picture7.Picture
Win3 = 3
End If
Count = 3
End Sub